<template>
    <div class="iframe">
        <div class="i-title">
            <h3>获取全局变量</h3>
        </div>
        <div class="i-tip">
            {{ gData.name }},{{ gData.code }}
        </div>
    </div>
</template>

<script setup>
import { reactive,getCurrentInstance } from "vue";

let gData = reactive({});
const { proxy: { $gData } } = getCurrentInstance();
gData = $gData;

</script>

